import 'package:kkhousekeep/generated/json/base/json_convert_content.dart';
import 'package:kkhousekeep/models/order_list_entity.dart';

OrderListEntity $OrderListEntityFromJson(Map<String, dynamic> json) {
	final OrderListEntity orderListEntity = OrderListEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		orderListEntity.code = code;
	}
	final List<OrderListObj>? obj = jsonConvert.convertListNotNull<OrderListObj>(json['obj']);
	if (obj != null) {
		orderListEntity.obj = obj;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		orderListEntity.msg = msg;
	}
	return orderListEntity;
}

Map<String, dynamic> $OrderListEntityToJson(OrderListEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['obj'] =  entity.obj.map((v) => v.toJson()).toList();
	data['msg'] = entity.msg;
	return data;
}

OrderListObj $OrderListObjFromJson(Map<String, dynamic> json) {
	final OrderListObj orderListObj = OrderListObj();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		orderListObj.id = id;
	}
	final String? woSn = jsonConvert.convert<String>(json['woSn']);
	if (woSn != null) {
		orderListObj.woSn = woSn;
	}
	final String? cTime = jsonConvert.convert<String>(json['cTime']);
	if (cTime != null) {
		orderListObj.cTime = cTime;
	}
	final String? address = jsonConvert.convert<String>(json['address']);
	if (address != null) {
		orderListObj.address = address;
	}
	final String? fatalType = jsonConvert.convert<String>(json['fatalType']);
	if (fatalType != null) {
		orderListObj.fatalType = fatalType;
	}
	final int? urgency = jsonConvert.convert<int>(json['urgency']);
	if (urgency != null) {
		orderListObj.urgency = urgency;
	}
	final int? area = jsonConvert.convert<int>(json['area']);
	if (area != null) {
		orderListObj.area = area;
	}
	return orderListObj;
}

Map<String, dynamic> $OrderListObjToJson(OrderListObj entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['woSn'] = entity.woSn;
	data['cTime'] = entity.cTime;
	data['address'] = entity.address;
	data['fatalType'] = entity.fatalType;
	data['urgency'] = entity.urgency;
	data['area'] = entity.area;
	return data;
}